<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8">
	<title>Aloha Block Plugin Testcase</title>
	<script language="javascript">
		Aloha = window.Aloha || {};

		Aloha.settings = {
			logLevels: {'error': true, 'warn': true, 'info': false, 'debug': false},
			errorhandling : true,

			plugins: {
				block: {
					defaults : {
						'.default-block': {
						},
						'.columnBlock': {
							'aloha-block-type': 'ColumnBlock'
						},
						'.uneditableColumnBlock': {
							'aloha-block-type': 'UneditableColumnBlock'
						},
						'.product-teaser': {
							'aloha-block-type': 'ProductTeaserBlock'
						},
						'.company': {
							'aloha-block-type': 'CompanyBlock'
						},
						'.imageBlock': {
							'aloha-block-type': 'ImageBlock'
						},
						'.editableImageBlock': {
							'aloha-block-type': 'EditableImageBlock'
						},
						'.news-block': {
							'aloha-block-type': 'NewsBlock'
						},
						'.sortable-news-block': {
							'aloha-block-type': 'SortableNewsBlock'
						},
						'.editable-product-teaser': {
							'aloha-block-type': 'EditableProductTeaserBlock'
						}
					},
					dragdrop: "1",
					dropzones: ["#editable-1"],
					config : {
						'toggleDragdrop': "1"
						// The following would make the toggleDragDrop button ignore the
						// per-editable config and make the button always show and toggle
						// the dragndrop feature for all editables.
						//toggleDragdropGlobal: true
					},
					editables : {
						"#editable-1": {'toggleDragdrop': true, 'dropzones': [ '#editable-1', '#editable-2' ]},
						"#editable-2": {'toggleDragdrop': true}
					}
				}
			},
			bundles: {
				// Path for custom bundle relative from require.js path
				user: '../demo/block'
			}
		};

	</script>

	<script src="../../lib/require.js"></script>
	<script src="../../lib/aloha.js" data-aloha-plugins="common/ui,common/format,common/paste,common/block,user/blockdemo,common/table,common/highlighteditables,extra/sourceview"></script>

	<link rel="stylesheet" href="../../css/aloha.css" type="text/css">
	<link rel="stylesheet" href="index.css" type="text/css">

	<style>
		.aloha-block-dropzone {background-color: #CCC;}
	</style>
</head>
<body>
	<div id="main">
		<div id="bodyContent">

			<h2><a name="edit-block-outside"></a>Editable 1</h2>
			<div class="editable" id="editable-1">
				<p>Williams, and other pilots who worked for <span class="company" data-symbol="MSFT">British Airways</span> claimed that their holiday pay was too low, because it only reflected his fixed salary, and not his bonuses. Williams' comprised a fixed annual salary, a "flying pay supplement" that went up the more he flew, and a "time away from base" which went up the more he was away from home. The flying and time away allowances were capped. Properly construed, his contract suggested that his holiday pay would be at the rate of only his fixed salary. Williams, however, contended that this was contrary to the Civil Aviation Working Time Directive,[1] as implemented by the Civil Aviation (Working Time) Regulations 2004,[2] (sector-specific implementations with the same objective as the Working Time Directive and the Working Time Regulations 1998 in this respect). In absence of particular provisions, the pay while on leave should be "normal remuneration". British Airways contended that because the Employment Rights Act 1996 sections 221 to 224 did not have provisions on how to determine a week's pay, the rate should be determined with reference to the contract.
	The Employment Appeal Tribunal allowed Williams' claim, but this was reversed in the Court of Appeal.[3] The Supreme Court made a reference to the European Court of Justice.</p>
			</div>

			<h2><a name="edit-block-inside"></a>Editable 2</h2>
			<div class="editable no-drag" id="editable-2">
				<p>Williams, and other pilots who worked for <span class="company" data-symbol="MSFT">British Airways</span>  claimed that their holiday pay was too low, because it only reflected his fixed salary, and not his bonuses. Williams' comprised a fixed annual salary, a "flying pay supplement" that went up the more he flew, and a "time away from base" which went up the more he was away from home. The flying and time away allowances were capped. Properly construed, his contract suggested that his holiday pay would be at the rate of only his fixed salary. Williams, however, contended that this was contrary to the Civil Aviation Working Time Directive,[1] as implemented by the Civil Aviation (Working Time) Regulations 2004,[2] (sector-specific implementations with the same objective as the Working Time Directive and the Working Time Regulations 1998 in this respect). In absence of particular provisions, the pay while on leave should be "normal remuneration". British Airways contended that because the Employment Rights Act 1996 sections 221 to 224 did not have provisions on how to determine a week's pay, the rate should be determined with reference to the contract.
	The Employment Appeal Tribunal allowed Williams' claim, but this was reversed in the Court of Appeal.[3] The Supreme Court made a reference to the European Court of Justice.</p>
				<div class="textcontent"><div class="editableImageBlock">
					<img src="blockdemo/img/stock-quote-aapl.gif" />
					<div class="aloha-editable">This Image Caption is editable through Aloha.</div>
				</div>
			</div>
				<p>Williams, and other pilots who worked for British Airways claimed that their holiday pay was too low, because it only reflected his fixed salary, and not his bonuses. Williams' comprised a fixed annual salary, a "flying pay supplement" that went up the more he flew, and a "time away from base" which went up the more he was away from home. The flying and time away allowances were capped. Properly construed, his contract suggested that his holiday pay would be at the rate of only his fixed salary. Williams, however, contended that this was contrary to the Civil Aviation Working Time Directive,[1] as implemented by the Civil Aviation (Working Time) Regulations 2004,[2] (sector-specific implementations with the same objective as the Working Time Directive and the Working Time Regulations 1998 in this respect). In absence of particular provisions, the pay while on leave should be "normal remuneration". British Airways contended that because the Employment Rights Act 1996 sections 221 to 224 did not have provisions on how to determine a week's pay, the rate should be determined with reference to the contract.
	The Employment Appeal Tribunal allowed Williams' claim, but this was reversed in the Court of Appeal.[3] The Supreme Court made a reference to the European Court of Justice.</p>
			</div>

		</div>
	</div>
	<script type="text/javascript">
	Aloha.ready( function() {
		Aloha.jQuery('.editable').aloha();
	});
	</script>
</body>
</html>
